home *** CD-ROM | disk | FTP | other *** search
- property audioController, adBanner, clickSoundFX, volumeSprite, dataBase, currMenu, hotspotList, eventList, killList
-
- on new me
- put "Title Class frame:" && the frame
- set killList to []
- set hotspotList to []
- set eventList to []
- SetGlobal(#gTitleObject, me)
- set audioController to new(script "Audio Controller Class")
- NewVolumeControl(me, GetGlobal(#volumeButton))
- set volumeSprite to GetGlobal(#volumeButton)
- set clickSoundFX to NewObject(me, "Sound FX Class", [#audioMember: "ugpMouseClick"])
- return me
- end
-
- on CheckIdle me
- set currCast to the mouseCast
- set currLine to the mouseLine
- set currSprite to GetHotSprite(currCast)
- set setCursor to 0
- repeat with obj in hotspotList
- if CheckRoll(obj, currSprite, currLine) then
- set setCursor to IsClickable(obj)
- end if
- end repeat
- if CheckIdle(currMenu, currSprite, currLine) then
- set setCursor to 1
- end if
- repeat with obj in eventList
- CheckIdle(obj)
- end repeat
- if setCursor then
- set cursMem to the number of member "hand cursor"
- set matteMem to the number of member "hand cursor matte"
- cursor([cursMem, matteMem])
- else
- cursor(-1)
- end if
- end
-
- on CheckMouseDowns me
- set currCast to the mouseCast
- set currLine to the mouseLine
- set currSprite to GetHotSprite(currCast)
- set destination to -1
- repeat with obj in hotspotList
- set myDest to CheckDown(obj, currSprite, currLine)
- if myDest <> -1 then
- set destination to myDest
- end if
- end repeat
- set menuDest to CheckMouseDowns(currMenu, currSprite, currLine)
- if menuDest <> -1 then
- set destination to menuDest
- end if
- if destination > 0 then
- KillAudio(audioController)
- dispose(currMenu)
- set currMenu to 0
- if stringp(destination) then
- if label(destination) > 0 then
- go(destination)
- else
- go(1, destination)
- end if
- else
- if integerp(destination) then
- go(destination)
- else
- put "Error: destination is not string or integer--Where the hell are you trying to go?"
- end if
- end if
- end if
- end
-